
<%@ page import="weblicitacao.Licitacao"%>
<!doctype html>
<html>
<head>
<meta name="layout" content="main">
<g:set var="entityName"
	value="${message(code: 'licitacao.label', default: 'Licitacao')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
	<a href="#show-licitacao" class="skip" tabindex="-1"><g:message
			code="default.link.skip.label" default="Skip to content&hellip;" /></a>
	<div class="nav" role="navigation">
		<ul>
			<li><a class="home" href="${createLink(uri: '/')}"><g:message
						code="default.home.label" /></a></li>
			<li><g:link class="list" action="list">
					<g:message code="default.list.label" args="[entityName]" />
				</g:link></li>
			<li><g:link class="create" action="create">
					<g:message code="default.new.label" args="[entityName]" />
				</g:link></li>
		</ul>
	</div>
	<div id="show-licitacao" class="content scaffold-show" role="main">
		<h1>
			<g:message code="default.show.label" args="[entityName]" />
		</h1>
		<g:if test="${flash.message}">
			<div class="message" role="status">
				${flash.message}
			</div>
		</g:if>
		<ol class="property-list licitacao">

			<g:if test="${licitacaoInstance?.tipo}">
				<li class="fieldcontain"><span id="tipo-label"
					class="property-label"><g:message
							code="licitacao.tipo.label" default="Tipo" /></span> <span
					class="property-value" aria-labelledby="tipo-label"><g:fieldValue
							bean="${licitacaoInstance}" field="tipo" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.nomeDoPregoeiro}">
				<li class="fieldcontain"><span id="nomeDoPregoeiro-label"
					class="property-label"><g:message
							code="licitacao.nomeDoPregoeiro.label"
							default="Nome Do Pregoeiro" /></span> <span class="property-value"
					aria-labelledby="nomeDoPregoeiro-label"><g:fieldValue
							bean="${licitacaoInstance}" field="nomeDoPregoeiro" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.empresa}">
				<li class="fieldcontain"><span id="empresa-label"
					class="property-label"><g:message
							code="licitacao.empresa.label" default="Empresa" /></span> <span
					class="property-value" aria-labelledby="empresa-label"><g:link
							controller="empresa" action="show"
							id="${licitacaoInstance?.empresa?.id}">
							${licitacaoInstance?.empresa?.encodeAsHTML()}
						</g:link></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.localDeEntrega}">
				<li class="fieldcontain"><span id="localDeEntrega-label"
					class="property-label"><g:message
							code="licitacao.localDeEntrega.label" default="Local De Entrega" /></span>

					<span class="property-value" aria-labelledby="localDeEntrega-label"><g:fieldValue
							bean="${licitacaoInstance}" field="localDeEntrega" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.data}">
				<li class="fieldcontain"><span id="data-label"
					class="property-label"><g:message
							code="licitacao.data.label" default="Data" /></span> <span
					class="property-value" aria-labelledby="data-label"><g:formatDate
							date="${licitacaoInstance?.data}" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.prazoDeVigencia}">
				<li class="fieldcontain"><span id="prazoDeVigencia-label"
					class="property-label"><g:message
							code="licitacao.prazoDeVigencia.label"
							default="Prazo De Vigencia" /></span> <span class="property-value"
					aria-labelledby="prazoDeVigencia-label"><g:fieldValue
							bean="${licitacaoInstance}" field="prazoDeVigencia" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.tipoItens}">
				<li class="fieldcontain"><span id="tipoItens-label"
					class="property-label"><g:message
							code="licitacao.tipoItens.label" default="Tipo Itens" /></span> <span
					class="property-value" aria-labelledby="tipoItens-label"><g:fieldValue
							bean="${licitacaoInstance}" field="tipoItens" /></span></li>
			</g:if>

			<g:if test="${licitacaoInstance?.itens}">
				<li class="fieldcontain"><span id="itens-label"
					class="property-label"><g:message
							code="licitacao.itens.label" default="Itens" /></span> <g:each
						in="${licitacaoInstance.itens}" var="i">
						<span class="property-value" aria-labelledby="itens-label"><g:link
								controller="item" action="show" id="${i.id}">
								${i?.encodeAsHTML()}
							</g:link></span>
					</g:each></li>
			</g:if>

			<g:if test="${licitacaoInstance?.lotes}">
				<li class="fieldcontain"><span id="lotes-label"
					class="property-label"><g:message
							code="licitacao.lotes.label" default="Lotes" /></span> <g:each
						in="${licitacaoInstance.lotes}" var="l">
						<span class="property-value" aria-labelledby="lotes-label"><g:link
								controller="lote" action="show" id="${l.id}">
								${l?.encodeAsHTML()}
							</g:link></span>
					</g:each></li>
			</g:if>

		</ol>
		<g:form>
			<fieldset class="buttons">
				<g:hiddenField name="id" value="${licitacaoInstance?.id}" />
				<g:link class="edit" action="edit" id="${licitacaoInstance?.id}">
					<g:message code="default.button.edit.label" default="Edit" />
				</g:link>
				<g:actionSubmit class="delete" action="delete"
					value="${message(code: 'default.button.delete.label', default: 'Delete')}"
					onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
			</fieldset>
		</g:form>

		<div id="list-lote" class="content scaffold-list" role="main">
			<h1>Lotes</h1>
			<table>
				<thead>
					<tr>

						<g:sortableColumn property="descricao"
							title="${message(code: 'lote.descricao.label', default: 'Descricao')}" />

						<th><g:message code="lote.licitacao.label"
								default="Licitacao" /></th>

						<g:sortableColumn property="prazoDeEntrega"
							title="${message(code: 'lote.prazoDeEntrega.label', default: 'Prazo De Entrega')}" />

						<g:sortableColumn property="quantidadeDeItens"
							title="${message(code: 'lote.quantidadeDeItens.label', default: 'Quantidade De Itens')}" />

					</tr>
				</thead>
				<tbody>
					<g:each in="${loteInstanceList}" status="i" var="loteInstance">
						<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">

							<td><g:link action="show" id="${loteInstance.id}">
									${fieldValue(bean: loteInstance, field: "descricao")}
								</g:link></td>

							<td>
								${fieldValue(bean: loteInstance, field: "licitacao")}
							</td>

							<td>
								${fieldValue(bean: loteInstance, field: "prazoDeEntrega")}
							</td>

							<td>
								${fieldValue(bean: loteInstance, field: "quantidadeDeItens")}
							</td>

						</tr>
					</g:each>
				</tbody>
			</table>

			<g:form controller="lote" action="create">
				<fieldset class="form">
					<g:hiddenField name="idLic" value="${licitacaoInstance?.id}" />
				</fieldset>
				<fieldset class="buttons">
					<g:actionSubmit controller="lote" action="create"
						class="save btn btn-danger" value="Adicionar Lote" />
				</fieldset>
			</g:form>

		</div>

				<div id="list-item" class="content scaffold-list" role="main">
					<h1>Produtos</h1>
					<table>
						<thead>
		
							<tr>
								<g:sortableColumn property="numero" title="${message(code: 'item.numero.label', default: 'Numero')}" />
							
								<g:sortableColumn property="descricao" title="${message(code: 'item.descricao.label', default: 'Descricao')}" />
							
								<g:sortableColumn property="quantidade" title="${message(code: 'item.quantidade.label', default: 'Quantidade')}" />
							
								<g:sortableColumn property="quantidadeMinima" title="${message(code: 'item.quantidadeMinima.label', default: 'Quantidade Minima')}" />
							
								<g:sortableColumn property="quantidadeMaxima" title="${message(code: 'item.quantidadeMaxima.label', default: 'Quantidade Maxima')}" />
							
								<g:sortableColumn property="valorUnitario" title="${message(code: 'item.valorUnitario.label', default: 'Valor Unitario')}" />
							
								<g:sortableColumn property="valorTotal" title="${message(code: 'item.valorTotal.label', default: 'Valor Total')}" />
							
								<g:sortableColumn property="prazoDeEntrega" title="${message(code: 'item.prazoDeEntrega.label', default: 'Prazo de Entrega')}" />
								
							</tr>
						</thead>
						<tbody>
						<g:each in="${itemInstanceList}" status="i" var="itemInstance">
							<tr class="${(i % 2) == 0 ? 'even' : 'odd'}">
							
								<td><g:link action="show" id="${itemInstance.id}">${fieldValue(bean: itemInstance, field: "numero")}</g:link></td>
							
								<td>${fieldValue(bean: itemInstance, field: "descricao")}</td>
							
								<td>${fieldValue(bean: itemInstance, field: "quantidade")}</td>
							
								<td>${fieldValue(bean: itemInstance, field: "quantidadeMinima")}</td>
							
								<td>${fieldValue(bean: itemInstance, field: "quantidadeMaxima")}</td>
							
								<td>${fieldValue(bean: itemInstance, field: "valorUnitario")}</td>
							
								<td>${fieldValue(bean: itemInstance, field: "valorTotal")}</td>
		
								<td>${fieldValue(bean: itemInstance, field: "prazoDeEntrega")}</td>
							</tr>
						</g:each>
						</tbody>
					</table>
				</div>


	</div>
</body>
</html>
